import request from '@/utils/request';

/**
 * @description: 分润列表
 * @date 2023-12-26 13:16
 */
export function profitList(query) {
  return request({
    url: '/bill/bill/list',
    method: 'get',
    params: query,
  });
}

// 分润统计
export function profitTotal(query) {
  return request({
    url: '/bill/bill/total',
    method: 'get',
    params: query,
  });
}

// 查询交易记录列表
export function listDeal(query) {
  return request({
    url: '/deal/deal/agent/list',
    method: 'get',
    params: query,
  });
}

// 查询交易记录详细
export function getDeal(id) {
  return request({
    url: '/deal/deal/agent/' + id,
    method: 'get',
  });
}

// 新增交易记录
export function addDeal(data) {
  return request({
    url: '/deal/deal/agent',
    method: 'post',
    data: data,
  });
}

// 修改交易记录
export function updateDeal(data) {
  return request({
    url: '/deal/deal/agent',
    method: 'put',
    data: data,
  });
}

// 删除交易记录
export function delDeal(id) {
  return request({
    url: '/deal/deal/agent/' + id,
    method: 'delete',
  });
}

// 获取交易详情
export function getDealData(id) {
  return request({
    url: '/deal/deal/agent/' + id,
    method: 'get',
  });
}

// 获取商户详细信息
export function getListData(id) {
  return request({
    url: '/tenant/user/' + id,
    method: 'get',
  });
}

// 查询交易记录统计列表
export function getListstatistics(query) {
  return request({
    url: '/deal/deal/agent/liststatistics',
    method: 'get',
    params: query,
  });
}

export function getMerTotalList(query) {
  return request({
    url: '/deal/deal/agent/getMerTotalList',
    method: 'get',
    params: query,
  });
}

export function getMerTotal(query) {
  return request({
    url: '/deal/deal/agent/getMerTotal',
    method: 'get',
    params: query,
  });
}
